﻿<Window x:Class="DigiFlare.DigiTweet.UI.OptionsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Options"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Black"
        BorderBrush="White"
        BorderThickness="1"
        Width="300" Height="175"
        ShowInTaskbar="False"
        FontSize="16">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="35" />
                <RowDefinition Height="1" />
            </Grid.RowDefinitions>
            <Border Grid.Row="0" BorderBrush="White" BorderThickness="0">
                <TextBlock Foreground="White"
                           Margin="5"
                           Text="Options" />
            </Border>
            <Canvas Grid.Row="1">
                <Line X1="0" Y1="0" X2="300" Y2="0" Stroke="White" StrokeThickness="1" />
            </Canvas>
        </Grid>
        <TextBlock Grid.Row="1" Grid.Column="0" 
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Text="Refresh Interval (minutes)" 
                   Foreground="White" />
        <TextBox Name="txtInterval" 
                 Grid.Row="1" Grid.Column="1"
                 Width="50" 
                 Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}, Path=RefreshInterval}"
                 HorizontalAlignment="Center"
                 VerticalAlignment="Center"
                 HorizontalContentAlignment="Right" />
        <TextBlock Grid.Row="2" Grid.Column="0" 
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Text="Enable Web Page Preview" Foreground="White" />
        <CheckBox Name="cbWebPagePreview"
                  Grid.Row="2" Grid.Column="1"
                  IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}, Path=IsWebPreviewEnabled}" 
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center" />
        <StackPanel Grid.Row="3" Grid.ColumnSpan="2"
                    Orientation="Horizontal"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center">
            <Button Foreground="White" Margin="10 0 10 0" Content="OK" Width="70" Click="OK_Click" Style="{DynamicResource GenericButton}" Cursor="Hand" />                            
            <Button Foreground="White" Margin="10 0 10 0" Content="Cancel" Width="70" Click="Cancel_Click" Style="{DynamicResource GenericButton}" Cursor="Hand"/>
        </StackPanel>
    </Grid>
</Window>
